﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks.Schedulers;

namespace MishraReader.Entities.Network
{
    internal class NetworkScheduler : INetworkScheduler
    {
        /// <summary>
        ///   Ordered Task scheduler
        /// </summary>
        private readonly LimitedConcurrencyLevelTaskScheduler _scheduler = new LimitedConcurrencyLevelTaskScheduler(1);
        
        public NetworkScheduler()
        {
            Factory = new TaskFactory(_scheduler);
        }

        public TaskFactory Factory
        {
            get;
            private set;
        }
    }
}